<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
        <!-- {{0?'存在':'不存在'}}
        {{name}} -->
        <H2>
            <span>{{name}}</span>
        </H2>
        <ul>
            <li v-for='(item,index) in arr'>
                <b v-if="index==2">{{item}}</b>
                <b v-else-if="index==3">这是第三个</b>
                <b v-else>这是else</b>
                <!-- <span>{{item}}</span> -->
            </li>
        </ul>
    </div>
    <script src="./vue.js"></script>
</body>
<script>
    const name1='李四';
    // 需要实例化vue
    const vue=new Vue({
        // el绑定标签
        el:'#app',
        // data用来存放数据
        data:{
            message:'hello Vue',
            name:'张三',
            arr:[1,2,3,4],
        },
    })
</script>
</html>